/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.mallsite.modules.shop.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 商品类型Entity
 * @author ruyang
 * @version 2020-12-04
 */
@Table(name="ms_goods_type", alias="a", columns={
		@Column(name="type_id", attrName="typeId", label="类型编码", isPK=true),
		@Column(name="type_name", attrName="typeName", label="类型名称", queryType=QueryType.LIKE),
		@Column(name="type_sort", attrName="typeSort", label="排序"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class GoodsType extends DataEntity<GoodsType> {
	
	private static final long serialVersionUID = 1L;
	private String typeId;		// 类型编码
	private String typeName;		// 类型名称
	private Integer typeSort;		// 排序
	
	public GoodsType() {
		this(null);
	}

	public GoodsType(String id){
		super(id);
	}
	
	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}
	
	@NotBlank(message="类型名称不能为空")
	@Length(min=0, max=255, message="类型名称长度不能超过 255 个字符")
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public Integer getTypeSort() {
		return typeSort;
	}

	public void setTypeSort(Integer typeSort) {
		this.typeSort = typeSort;
	}
	
	
	
}